<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>密码设置 - 会员中心 -{$sitename}</title>
{include file="center_include"/}
</head>
<body>
{include file="center_header"/}
<!-- // i-header end -->
<div id="content" class="layout">
  <div class="ui-box ui-qire fn-clear" id="i-box">
    <div id="i-bar">
 {include file="center_nav"/}     
 {include file="center_fk"/}
    </div>
    <!-- // i-bar end -->
    <div class="i-box-cnt" id="i-cnt">
      <form id="myform" method="post" onsubmit="return false;">
        <div id="i-password">
          <div class="ui-title i-tab-nav-box">
            <ul class="i-tab-nav fn-clear">
              <li><a href="{:zanpian_user_url('user/center/info')}" hidefocus="">基本资料</a></li>
              <li class="line"></li>
              <li><a href="{:zanpian_user_url('user/center/email')}" hidefocus="">订阅设置</a></li>
              <li class="line"></li>
              <li><a href="{:zanpian_user_url('user/center/avatar')}" hidefocus="">头像修改</a></li>
              <li class="line"></li>              
              <li class="current"><a href="{:zanpian_user_url('user/center/pwd')}" hidefocus="">修改密码</a></li>
            </ul>
          </div>
         <div class="ui-form">
            <div class="ui-form-item fn-clear">
              <label for="password" class="ui-label w130">原密码：</label>
              <input type="password" id="password" name="info[password]" maxlength="20" class="ui-input w250" value="">
              <p class="onShow ui-message" id="passwordTip" style="">请输入密码</p>
            </div>
            <div class="ui-form-item fn-clear">
              <label for="newpass" class="ui-label w130">新密码：</label>
              <input type="password" id="newpass" name="info[newpass]" maxlength="20" class="ui-input w250" value="">
              <p class="onShow ui-message" id="newpassTip" style="">请输入密码</p>
            </div>
            <div class="ui-form-item fn-clear">
              <label for="verifypass" class="ui-label w130">重复密码：</label>
              <input type="password" id="verifypass" name="info[verifypass]" maxlength="20" class="ui-input w250" value="">
              <p class="onShow ui-message" id="verifypassTip" style="">输再次输入密码</p>
            </div>
            <div class="ui-form-item fn-clear">
              <label class="ui-label w130"></label>
              <input type="hidden" name="dosubmit" id="dosubmit" value="1">
              <input type="submit"  id="savebt" class="ui-button w150" value="保 存" />
              <a href="{:zanpian_user_url('user/login/forgetpwd')}">忘记密码了？</a></div>
          </div>
          <!-- // ui-form End -->
        </div>
      </form>
    </div>
    <!-- // i-cnt End -->
      <script type="text/javascript">
			$.formValidator.initConfig({
				formID:"myform",
				debug:false,
				submitOnce:false,
				onSuccess:function(){
					//alert('dddddddddddddd');
					$("#myform").qiresub({
						curobj:$("#savebt"),
						txt:'数据提交中,请稍后...',
						onsucc:function(result){
							//$.showfloatdiv({offset:$("#register").offset(),txt:'成功注册'});
							$.hidediv(result);
							if(parseInt(result.rcode)>0)
							{
								$("#password").val('');
								$("#newpass").val('');
								$("#verifypass").val('');
							}
							//alert(result.msg);
						}
					}).post({
						url:"{:zanpian_user_url('user/center/pwd')}"
						});
					return false;
				},
				onError:function(msg,obj,errorlist){
					$("#errorlist").empty();
					$.map(errorlist,function(msg){
						$("#errorlist").append("<li>" + msg + "</li>")
					});
					//alert(msg);
				},
				submitAfterAjaxPrompt : '有数据正在异步验证，请稍等...'
			});
			
			$("#password").formValidator({
				onShow:"请输入密码",
				onFocus:"至少6个长度",
				onCorrect:"密码输入正确",
				onError:'密码不能为空'
			})
			.inputValidator({
				min:6,
				empty:{
					leftEmpty:false,
					rightEmpty:false,
					emptyError:"密码两边不能有空符号"
				},onError:"密码在6-16位"
			});
			
			$("#newpass").formValidator({
				onShow:"请输入密码",
				onFocus:"至少6个长度",
				onCorrect:"密码合法"
			})
			.inputValidator({
				min:6,
				empty:{
					leftEmpty:false,
					rightEmpty:false,
					emptyError:"密码不能为空"
				},
				onError:"密码在6-16位"
			});
			
			// Verifypassword
			$("#verifypass").formValidator({
				onShow:"输再次输入密码",
				onFocus:"至少6个长度",
				onCorrect:"密码一致"
			})
			.inputValidator({
				min:6,
				empty:{
					leftEmpty:false,
					rightEmpty:false,
					emptyError:"重复密码必须和新密码一致"
				},onError:"重复密码必须和新密码一致"
			})
			.compareValidator({
				desID:"newpass",
				operateor:"=",
				onError:"2次密码不一致,请确认"
			});
		</script>
  </div>
  <!-- // maxBox End -->
</div>
<!-- // wrap End -->
{include file="footer"/}
<script type="text/javascript" src="{$apicss}user/new/js/login.js"></script>
</body>
</html>